home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
osg.zip
/
README.105
< prev
Wrap
Text File
|
1990-12-10
|
62KB
|
1,527 lines
.PL
Object Code SCREEN GENERATOR - OSG
Distributed by
Inventories Unlimited Inc.
222 Church Street - 5g
Philadelphia PA 19106
(215) 922-2557
Data: (215) 627-3910 (PC Pursuitable)
Version 1.05, Released 10 October 1987
Microsoft, MS, QuickBASIC, CodeView and MS-DOS are registered
trademarks of Microsoft Corporation.
CLIPPER is a registered trademark of Nantucket.
(c) 1987 Roy Barrow & Douglas H. Steen 1
Object Code SCREEN GENERATOR - OSG
OSG consists of the following programs:
OSG.EXE - Screen Definer
OSGBASIC.EXE - QuickBASIC Input Definition
and of the following libraries
OSG.LIB - Screen Drivers
OSGINPUT.LIB - Input Modules (QuickBASIC)
Check that your ARCHIVE or DISTRIBUTION disk contains the above
programs and linraries. NOTE that OSGINPUT.LIB is distributed
only with the commercial version.
Introduction
OSG was first released in August of 1987. Since then, we have
added features that users have requested and some of our own. We
fixed whatever bugs were reported to us, and developed a series
of support programs. We would like to thank the following people
for their invaluable contribution in testing and suggesting!
Derron Simon, Dan Ashler, John Ferguson, Steve Skindell, Chip
Rabinowitz.
What does OSG accomplish ?
Firstly, OSG is a full featured screen generator. Any free-form
screen may be designed. This screen can be saved, and then called
back later for modification. An option exists to OUTPUT the
screen to an ASCII file for inclusion with your program
documentation.
The purpose of OSG is not always clear. It was initially
developed for QuickBASIC programmers so that screens could be
stored out of the string data segment. QuickBASIC's severe 64K
string segment limitation, and the speed in which QB updated the
display, were two major obstacles that needed overcoming.
OSG's initial output was in the form of Macro Assembler code.
This in its'self was a limitation as we found that many people
either did not have the Macro Assmebler, or did, but had no idea
how to use it !
OSG then changed direction and produced .OBJ file (INTEL /
Microsoft format) that may be linked into applications. (See
technical information for more details).
Along with the .OBJ file created, provided is a screen driver
library that also needs linking to your application. The overhead
for the module(s) is less than 800 bytes in total.
This same .OBJ file is language independant, and may be utilized
in languages that allow INTEL / Microsoft Relocatable Object file
linking.
(c) 1987 Roy Barrow & Douglas H. Steen 2
Object Code SCREEN GENERATOR - OSG
Among these languages are:
Microsoft QuickBASIC
Microsoft Assembler
Microsoft C
Microsoft PASCAL
Microsoft FORTRAN
BORLAND TURBO C
MANX AZTEC C
DATALIGHT C
NANTUCKET CLIPPER
although, as a general rule, if you language allows linking to
external ASSEMBLY language routines (in .OBJ format) then you
should have no problems in using OSG
What else does OSG do ?
OSG includes a utility program called OSGBASIC which is purely
for QuickBASIC users.
OSGBASIC is a utility that allows the user to call up a screen
image and then define input points upon that screen. OSGBASIC
then goes ahead and generates program code that will do all of
the input as defined.
An appendix contains documentation on OSGBASIC.
Documentation Standards
If you see a block of text with braces around it (like {RETURN})
then you know that this refers to a SINGLE key stroke or ALT,
SHIFT or CTRL combination. The above illustration means that you
have pressed the {RETURN} or {ENTER} key; other clear examples
are {ESC} (the escape key), or {F1} (function key one).
An ALT, CTRL or SHIFT combination is highlighted as {ALT+A},
where the '+' indicates that BOTH ALT and A should be pressed
(hold down the ALT key and press A).
Installing OSG
You will need the following hardware to use OSG effectively.
IBM PC, PC/XT, PC/AT, PS2 and all compatibles thereof with at
least 320K
Monochrome, CGA or EGA
Two floppy disks (Hard Disk recommended)
and, the following software
Language supporting INTEL / MICROSOFT Relocatable Object Files
(c) 1987 Roy Barrow & Douglas H. Steen 3
Object Code SCREEN GENERATOR - OSG
To install OSG, you will need the following files:
OSG.EXE (OSG Program)
OSG.LIB (OSG Library, screen drivers)
(You may also want to install OSGBASIC and OSGINPUT.LIB in the
same way)
With these in-hand, do the following:
Create a directory that will be used in storing your screen
files. Both the .OSC (Image Format) and .OBJ files will reside in
this directory.
Copy your OSG.EXE and OSG.LIB file to this directory.
As you create .OBJ files from images, you may want to (if you
have the LIB utility program) add these files to the OSG.LIB
file.
The \SCREENS directory has now been created. Don't add it to your
PATH or you are bound to end up having .OSC files all over the
place.
Using OSG
Running OSG is simple. Type OSG from the DOS prompt, and away you
go.
You can get past the initial startup screen by pressing ENTER.
At this point, you are ready to start defining a screen. By
typing and using the normal control keys, you will be able to
navigate your way around the display.
Normal typing (characters that have a one key combination entry
and do not include function keys) will produce characters upon
the screen - wrapping when the end of the line is reached, and
wrapping around to the top when the bottom of the screen is
reached.
In this fashion, the cursor, delete, insert and backspace keys
work in the same fashion you would expect an editor to. A few
moments of typing and using these keys will give you all the
training you need on getting around the screen.
Some other editing keys that exist are perhaps not so clear, or
are handled differently in this program than others you might be
used to.
{PageUp} and {PageDown} will move the cursor to the top and
bottom of the screen, respectively.
{Home} and {End} will move the cursor to the top left hand corner
(c) 1987 Roy Barrow & Douglas H. Steen 4
Object Code SCREEN GENERATOR - OSG
and the bottom right hand corner, respectively.
{Control + Right arrow}, and {control + Left arrow} will move the
cursor to the right and left hand sides of the screen,
respectively.
In addition, the default TAB settings are placed five spaces
apart, and may be used by pressing the {TAB} key and {SHIFT+TAB}
for backwards movement.
Two other 'movement' controls exist that do not fit into the
discussion here, but will be mentioned for completeness.
{ALT+K) will move the cursor BACK to a previous word, and {ALT+W}
will move it forward to the next word.
The function keys (f1 through f10) may be assigned key
combinations. This is discussed under MACRO DEFINITIONS.
When you are ready to create an OBJECT file from a screen image,
read the section entitled OBJECT FILES.
The technical details appendix describes the OBJ file and OSC
file formats and storage methods. This section of the manual also
includes the assembly language source for the screen drivers.
Now, there are numerous control keys that will assist in creating
screens, and we'll discuss them one by one.
Individual Options
OSG incorporates an on-line help facility. This should make the
program easier to use, although no product is complete without a
manual.
The format for the rest of this manual involves a discussion of
the options available, supported by their respective help
screens.
ALTERING THE VIEWPORT / ADJUSTING BOUNDARIES.
Normally, the screen that you will be working with is 80 columns
by 24 rows. The last row on the screen (25) is reserved for OSG
status use.
You may narrow this viewport so that most of the actions that
you take will affect only this area of the screen.
To modify the viewport, the combination {ALT+A} must be chosen.
This is the standard command issuing sequence. {ALT+A} is
accomplished by holding down the ALT key and pressing A.
A box or rectangle will then open up on the screen. You will
notice that one of the corners is highlighted with a double width
drawing character. This is the ACTION corner - any cursor
(c) 1987 Roy Barrow & Douglas H. Steen 5
Object Code SCREEN GENERATOR - OSG
controls issued will affect this corner. You may now move the
sides of the screen to where you want it by selecting the cursor
keys. To move the highlight (or ACTION corner), press the {TAB}
key and you will notice the highlight move clockwise.
You may also move the box around the screen by first pressing the
{SCROLL LOCK} key and then using the CURSOR or ARROW keys.
(CURSOR and ARROW keys have the same meaning in OSG).
When you have sized and moved your VIEWPORT to the point you want
it, you may exit the selection by pressing {ESC} or {RETURN}.
Now try typing and you will notice a different WRAP AROUND - it
now happens at the edges of the view port.
There are a number of advantages to using different viewport
sizes. If you wish to split the screen into two columns and
place information in one, and then information in another, you
will know that most of the editing that you do will only affect
the current viewport.
The viewport is changed by using the 'box selection method'.
Please refer to 'Box Selection in the appendix'
OSG is initiated with boundaries (or margins) set as the full
screen. The bottom line of the screen cannot be used - this is a
status line.
There are two options in changing boundaries:
ADJUST screen Boundaries {ALT+A}
A rectangular selection box appears in the center of the screen.
This box is manipulated (see Box Selection), and an area of the
screen is clipped. This clipped area now defines the 'viewport'
that all subsequent operations will take affect in.
EXPLODE to full
A rectangular selection box appears at the edges of the screen.
This boundary can simply be set by pressing ESC or ENTER, or
manipulated.
CHARACTER TOGGLE FOR NUMERICS {ALT+C}
The numeric keypad, either at the right hand of the typewriter
pad or on the typewriter pad may be used in placing graphic
characters upon the screen. (Graphic drawing characters).
To toggle this character mapping on or off, the {ALT+C} combina-
tion is used.
By using the Numeric Character Mapping option, a number of the
graphic drawing characters may be mapped onto the numeric keypad.
The definitions mapped are either single or double line types as
(c) 1987 Roy Barrow & Douglas H. Steen 6
Object Code SCREEN GENERATOR - OSG
selected by GRAPHIC DRAWING SET option.
Turn this option on and test the mapping functions.
DRAWING {ALT+D}
After the drawing toggle is selected, only arrow keys may be used
in moving the cursor around the screen. A trail of the drawing
characters will follow on the screen. When crossing, or adjacent
to other characters, OSG will determine what it thinks is the
correct character. As this does not always produce the desired
results, an option to place any character (from the IBM character
set) has been included. (Invoke this with a CTRL-A combination).
What character is produced depends upon the current drawing
character type selection. (See Graphic drawing set Change). It
will be either a double or single line graphic character value.
To exit from DRAW mode, a RETURN or ESC key must be pressed. If a
RETURN key is pressed, then the cursor will move down to the
start of the next line.
Drawing is disabled during MACRO execution. Drawing is only
controllable from the keyboard.
ERASE ROW or COLUMN {ALT+E}
Either the column or row at the current cursor position may be
deleted. If COLUMN is selected, then the current column will be
erased, and all of the columns to the RIGHT of the current row
will be moved left by one column.
When deleting a ROW, all of the lines BELOW the one being deleted
will be moved up by one. Notice that the ERASE function (as with
most functions inside of OSG) will only affect the current
viewport defined by the ADJUST BOUNDARIES option.
Commands for ERASE ROW and COLUMN may be embedded into MACRO
definitions. The bottom row or right most column that is added to
the file will be filled with Blanks. This only determines what
the color will be of future types characters. All those on the
screen will remain with their current colors / attributes.
If you wanted to scroll a section of the screen up, you could
select that area as the viewport, and then just erase a row at
the top. Similarly, if you wished to scroll it left (or even
right for that matter), you could select the area, and either
delete or insert a column.
FOREGROUND and BACKGROUND color {ALT F}
This will determine which colors are to be set for all subsequent
typing. Moving the selection box to a specific color combination
and pressing ENTER will make this selection.
A word or two of caution here: OSG's screens will display the
(c) 1987 Roy Barrow & Douglas H. Steen 7
Object Code SCREEN GENERATOR - OSG
attributes that you select upon a variety of monitors. What
appears on an EGA will differ from a CGA, which in turn will
differ from a Monochrome Display. It is only by experimenting
that you will decide which are the correct color combinations to
use in your programs, determined largely by the programs'
intended audience.
The screens throughout OSG have been left Monochrome. This does
not detract from the programs' appearance. It just makes the
usage of it more universal.
The "Selecting a color" function is used in other areas, so
coverage on making the selection is inserted here and referred
to from this point on.
A box with highlighted cells (test patterns) appears on the
screen with a rectangle highlighting one of them. This rectangle
may be moved from pattern to pattern, upwards and downwards, left
and right by using the cursor keys. {Home} will move the
selection rectangle to the top left corner, while {END} will take
it to the lower right corner.
A color combination for foreground and background is selected by
pressing {ENTER} or {ESC}
GRAPHIC DRAWING SET CHANGE {ALT+G}
This defines what characters will appear when using DRAW. Also,
if Character Mapping (for numbers) is ON, then Number pressing
(or entries in macros) will produce the currently toggled line
type character.
You may toggle the Graphic Drawing set between single and double
width drawing characters. You do not need to remember all these
functions - pressing the HELP key ALT+H will bring up a summary
of the functions available. Pressing the associated letter for
the key that you need help upon will display more detailed
information for that option.
HELP MENU {ALT+H}
The help menu gives a list of the available functions (summarised
below) that you may seek further help upon. At any time from
HELP, the function key {f10} will return you to the editor.
A Adjusting Boundaries
C Character Toggle for Numerics
D Drawing
E Erase Row or Column
F Foreground and Backround Color
G Change the Graphic Drawing Set
H THIS HELP SCREEN
I Insert Row or Column
(c) 1987 Roy Barrow & Douglas H. Steen 8
Object Code SCREEN GENERATOR - OSG
J Justify line Left, Right, Center
L Load screen file into memory
M Macro Definitions
N New Screen, Reset this one
O Object file create
P Print file create
Q Quit and save or abandon
R Replace a character
S Select and Paste, Erase, Fill
Invert or Change colors
T Tab Settings
V Version and Details
X Exit to DOS Temporarily
F1 General Editing Functions
F2 MACRO Embedded Codes
F4 Object files - using in your applications
INSERT ROW or COLUMN {ALT+I}
Either a column or row at the current cursor position may be
inserted.
If COLUMN is selected, then the current column will be moved to
the right, and a column of blank characters will be inserted.
Whatever was on the last column of the screen, or viewport will
drop off.
Inserting a row will move the current row (and all rows beneath)
one line down, with the bottom line of the screen (or viewport)
dropping off the screen. As with ERASE, the commands issued only
take affect within the current view-port. These commands for
Insert may be embedded into MACRO definitions. The row or column
that is added to the screen will be filled with blanks.
JUSTIFY A LINE {ALT+J}
As with a number of features of OSG, it is recommended that you
SAVE your screen image regularly to ensure that an 'edit' is not
fatal.
Justification of a line takes place only within the currently
defined viewport. Three options for JUSTIFY exit - Left, Right or
Center. Justification of a line will trim leading and trailing
blanks, justify the string in accordance with the choice that you
made, then before displaying it, pad the line with either leading
or trailing spaces (both - in the case of Center Justify) Macro
definitions exist for justification. Justify will always leave
the cursor upon the current row and column.
LOAD SCREEN FILE INTO MEMORY {ALT+L}
OSG gives an extension of .OSC to the files that it creates for
screen images. Files created in this fashion may be read from
disk to allow for modifications. (Format of the .OSC files is
(c) 1987 Roy Barrow & Douglas H. Steen 9
Object Code SCREEN GENERATOR - OSG
discussed in the documentation).
A selection of a file to load is made from a scroll box. The
scroll box is 'navigated' with the following keys:
[up arrow] - Move up one selection
[down arrow] - Move down one selection
[page down] - Move down one scroll box
[page up] - Move up one scroll box
[home] - Move to top of scroll box
[end] - Move to end of scroll box
[return] - Make selection of currently high-lit item
[esc] - Exit scroll box without selection
If MERGE is chosen, then the cells that are NOT blank in the
merged file will displace what is on the screen.
To load a screen image into memory from disk, you should press
the {ALT+L} combination.
Two load options are available: a COMPLETE load, or a MERGE load.
If you choose COMPLETE, then the contents of the screen will be
completely replaced by the screen image loaded. If you need to
keep hold of the current screen image, then ensure that you use
the SAVE option before LOADing a screen.
A MERGE load will do the following: Any character cell that is
not a space in the file BEING MERGED, will replace what is on the
current screen.
MERGE is to be used when bringing in a common section (although
spaces will be ignored). MERGE is really not the best way to do
this. If you need to work with a common section, then use it as
the base for designing a screen. What the OSC file looks like is
not related to the ACTUAL object file. The OBJECT file can
contain screen primitives and a number of OBJECT files (calls)
can be used in creating just one screen.
{ALT+L} will either do nothing (in which case you know that there
are no files to load), or it will display a scroll box from which
you may select a file. These files all have extensions of OSC. If
you are using a program, or set of programs, that already makes
use of this extension, we suggest setting up OSG in a directory
of its own. (Actually, we suggest you do this at any rate).
MACRO DEFINITIONS {ALT+M}
Macros are common key strokes that you may assign to a function
key. There are 40 function keys that may be defined. These are
NORMAL, SHIFT, CTRL and ALT F1 through F10.
Macro definitions may have the extended character set embedded
within. When editing a Macro definition, pressing one of the
(c) 1987 Roy Barrow & Douglas H. Steen 10
Object Code SCREEN GENERATOR - OSG
function keys will allow you to insert any of these characters.
Macros may invoke other macros, and also themselves (there is a
limit of 2000 displayable characters).
An example of a MACRO definition has been included for you to try
out, and also as an example. MACROS can be very powerful and
productive when used correctly.
MACRO EMBEDDED CODES
The Macro codes may be placed into macro definitions. There are
both command and editing macros, and macro key macros. (In that,
we mean that you are able to call a MACRO from a MACRO, even the
calling MACRO).
The format for the MACRO calling is:
\A New Screen
\B Quit
\C Character Map
\D Down Arrow
\E END
\F Select Color
\G Graphic Set
\H Home
\I Insert Toggle
\J (RESERVED)
\K (RESERVED)
\L Left Arrow
\M Merge Screen
\N Load Screen
\O Object Create
\P Print Create
\Q Quit & Save
\R Right Arrow
\S Select & Paste
\T TAB Settings
\U Up Arrow
\V Version
\W Insert Row
\X Insert Column
\Y Erase Row
\Z Erase Column
\a Select & Erase
\b Expand Borders
\c Justify Center
\d Delete
\e Carriage Return
\f Delete file
\g Select & fill
\h Select & Color Change
\i Select & Invert
\j Copy Line
\k Swap Line
\l Justify left
(c) 1987 Roy Barrow & Douglas H. Steen 11
Object Code SCREEN GENERATOR - OSG
\m Load Macros
\n Macro Change
\o (RESERVED)
\p (RESERVED)
\q (RESERVED)
\r Justify Right
\s Shift TAB
\t TAB
\u (RESERVED)
\v (RESERVED)
\w Show 'Whereis'
\x Shell to DOS
\y (RESERVED)
\z (RESERVED)
\\ '\' Character
The MACRO definitions for calling other Macros are in the format
of:
\nv where
n would be a value between 1 and 0 (0 indicating 10), and v is
between A and D, which are A:Normal, B:Shift, C:Control, D:Alt.
Here are a few examples.
\1A Normal F1
\3B Shift F3
\0D ALT F10
\7C Control F7
This should be enough .... experiment!
NEW SCREEN {ALT+N}
This will erase the contents of the currently defined viewport.
Remember to increase the boundaries to the full screen if you
wish to erase the whole screen. The other option that you have is
invoking the SELECT and ERASE option, and the increasing the
selection box to the full screen size.
This NEW SCREEN Option has been largely replaced by the select
and erase function but has been 'left in' for completion. Using
the selection box is covered in the documentation.
OBJECT FILE CREATION {ALT+O}
Two options exist when creating OBJ files from a screen. The
screen may either be STATIC or LOCATABLE.
STATIC screens will always be displayed back upon the same point
on the screen. This is normally used for whole screen, fixed
inputs etc.
(c) 1987 Roy Barrow & Douglas H. Steen 12
Object Code SCREEN GENERATOR - OSG
LOCATABLE screens may have a ROW,COLUMN set of co-ordinates
passsed to them which indicate the top left hand corner.
This would be typically used in drawing primitives. At that
point, one could 'build' a screen or object from these primitives
and display them at any point on the screen.
Dialog boxes, scroll boxes and 'floating' menus come to mind. The
OBJ file that is created will have the .OBJ extension, and may be
used in a variety of languages.
{ALT+O} invokes Object file creation. Any portion of the screen
(even outside of the current viewport) may be selected for OBJECT
creation. (See Box Selection)
In creating an OBJECT file, you may select a RECTANGULAR area of
the screen from a few lines and columns up to the whole screen.
OSG then optimizes the contents of the screen and squeezes it in
the smallest possible format.
If you have a common screen header (i.e. the top 3 lines of the
screen), then your best approach would be to create an object
file that has these three lines. Each program, or section of
program, that displays a screen where this standard header is
needed, simply places a call to HEADER and then displays the rest
of the screen.
In this fashion, your programs can become MUCH smaller.
OSG will prompt you for a file name to create. This file name is
the calling name that you will use within your programs, as well
as the OBJECT file name.
The object file that is created may be directly linked into an
application program. It should be remembered that another section
of program code needs to be linked in with the screen that is
created. This Object file is needed only once. If you have 12
screens in a program, then your effective total of external
OBJect files for running OSG screens is 13. This file is
OSG.LIB.
OSG directly generates OBJECT code, as described in the following
documents:
MS-DOS Programmers Reference Manual (P/N 036-014-012)
October 1985 issue of PC Tech Journal
8086 Relocatable Object Module Formats, Ver 4.0 (121748-001)
Check the technical appendix for information on both the
structure of the object files and the screen images.
The OBJECT code that is generated may be linked into your
application using the MSDOS LINK program, or generally a LINK
program that was distributed with your programming language.
(c) 1987 Roy Barrow & Douglas H. Steen 13
Object Code SCREEN GENERATOR - OSG
The various LINK options may differ from language to language,
and this is best covered in you language manual. You only need to
know that you will be linking two files, the screen you have
generated (extension of .OBJ) and the video support file
(OSG.LIB) .
OSG.EXE is the program that will produce the OBJECT files, but
each of these OBJECT files reference OSG.LIB, which is the video
driver. OSG's generated OBJECT files MUST be linked with OSG.LIB.
If there is any confusion in this matter, please refer to OBJECT
linking in your programming manual, or one of the documents
referred to above.
PRINT FILE CREATION {ALT+P}
A print file is a pure ASCII representation of the file that
exists upon the screen. Although in general PRINT files may be
used in helping to create user documentation, there are problems
associated with this. The ASCII file will have ALL of the
characters that you placed upon the screen in it. This means that
all of the control and extended characters will be included.
Now, some control characters have affect upon your printer, and
one in specific indicates an END of file to many applications.
Naturally, with so many environments, yours may have many other
problems character combinations associated with it.
QUIT {ALT+Q}
It is important to save the screens you work with, as there is
almost always a need for it to be changed. Many people FORGET to
save their screens. That is why we have placed it in the QUIT
option, so that you do NOT forget.
It is a good idea to set up a MACRO key for saving your screen
occasionally. The MACRO definition will not continue and ask if
you want to QUIT, as it will do from the keyboard prompt.
Usually, saving the screen is the last thing that you do before
you exit the program. Just to ensure that you haven't forgotten
to do this, we placed the SAVE option near QUIT!
Both options prompt with "Are you sure" before actually quitting.
There should be little chance of losing a screen by a slip of a
key.
It is recommended that the {ALT+Q} and the save option be used
regularly because you are BOUND to have a powerfailure when you
are in the middle of designing the BEST SCREEN YET SEEN BY
MANKIND.
The other alternative is defining a MACRO which are a series of
these common keystrokes. That is, always do a SAVE before a LOAD
or a QUIT.
(c) 1987 Roy Barrow & Douglas H. Steen 14
Object Code SCREEN GENERATOR - OSG
REPLACE A CHARACTER {ALT+R}
REPLACE is a simple way of substituting one character with
another. If the screen contains many drawing characters, it may
be easier to use the replace option, rather than redrawing the
sections. The character that is being replaced may not be a
space, not may the character replacing another be a space. It is
a good practice to SAVE the screen before such a search and
replace.
{ALT+S} SELECT AND...
{ALT+S} is one of the most powerful commands in OSG. With this
command you are able to
Select an area of the screen and
copy it to another area
erase it completely
fill it with a solid color
invert the foreground and the background colors
re-color (change) the current color attributes
Selecting an area of the screen is done by using the selection
box which has been discussed previously.
Each of these options involves using a SELECTION BOX which is
discussed in the documentation.
PASTE allows an area to be selected and the 'dragged' and copied
to another area. The orginal area remains intact.ERASE allows the
selected area to be set to blanks.
FILL places spaces in the selected area with a chosen color
combination.
INVERT changes the color combinations (foreground to background).
This is a method of attaining colors that are not normally
present in OSG.
CHANGE COLORS does just that; it leaves that characters as they
currently exist, but just modified their attributes / colors.
TAB SETTINGS {ALT+T}
TABS are normally set (upon startup) at every 5 character
intervals. You have the option to change these intervals or to
clear the TAB settings completely.
When there are no TAB settings, using TAB (or SHIFT TAB -
Backwards) then the cursor will move to the next line but at the
same column co-ordinate.
(c) 1987 Roy Barrow & Douglas H. Steen 15
Object Code SCREEN GENERATOR - OSG
When used, TABS provide one of the fastest methods to get around
the screens. If you have 4 tabs set, for instance, you could
define 4 FUNCTION keys to move directly to those tab positions.
Here is an example:
VERSION AND DETAILS {ALT+V}
This option displays whatever the current version of the program
is, and any details specific to that version. If you have any
queries about the use of this program, the please check the
version before contacting us.
NEW versions of OSG will be released from time to time, with new
features - some of which are feedback from yourselves, and some
of which are our own consideration.
You may register your copy, and receive free assistance. Also, If
you need help, but you are not registered, then a SASE will do
just fine.
{ALT+X} should be used only when you need to exit to DOS to run a
program urgently.
YOU MUST NEVER RUN A TSR (Terminate and Stay Resident) program
when you have exited to DOS in this fashion. In all likelihood,
you will not be able to RETURN to OSG, and will probably CRASH
the system.
EXIT TO DOS You may 'SHELL' out to dos temporarily. Whilst this
is a useful feature, it is also a great way to crash your system!
Be careful not to run any TSR's whilst in the DOS section.
If you are having a PROBLEM in shelling to DOS, please check the
amount of memory you have free. If this is not your problem, then
check to see that COMMAND.COM is in your ROOT directory upon the
current disk. Included is a description of the general editing
functions.
GENERAL EDITING FUNCTIONS
[home] - Move to top left corner of screen
[end] - Move to bottom right corner of screen
[page up] - Move to top of screen
[page down] - Move to bottom of screen
[ctrl left arrow] - Move to left margin of the screen
[ctrl right arrow] - Move to right margin of the screen
[insert] - Toggle the Insert function on or off
[delete] - Delete the character to the right, move rest one
closer
[backspace] - Delete the character to the left, move the cursor
left
[esc] - Repeat the last character or function [tab] - Move to the
next Tab stop
[shift tab] - Move to the prior Tab stop
(c) 1987 Roy Barrow & Douglas H. Steen 16
Object Code SCREEN GENERATOR - OSG
[alt w] - Move to the start of the next word
[alt k] - Move to the end of the previous word
[ctrl w] - Show the current row & column co-ordinates
[ctrl a] - Choose any displayable character (also not on
keyboard)
[ctrl c] - Copy the above line to this line, move down one line
[ctrl s] - Swap line with above, move one line up
(c) 1987 Roy Barrow & Douglas H. Steen 17
Object Code SCREEN GENERATOR - OSG
APPENDIX - Technical Information
The screen storage format is in 2000 pairs of bytes. The first
byte is the attribute for the character, the second is the
character its'self. This format can be gleaned from most any
technical programming guide for the PC, too many to mention, too
many good ones.
Technical errata on screen object file:
The purpose of this errata is to inform the technical user about
specific information when using OSG object files in an
application.
This errata does not describe Microsoft/Intel object files and
assumes the reader has rudimentary knowledge of 8086 assembler. A
knowledge of how assembly language routines are called from the
development language (BASIC,PASCAL, etc..) is also assumed. The
manner in which current MS-DOS languages call assembly language
routines differ (sometimes drastically) and are beyond the scope
of this errata.
This document refers often to the attached assembly language
source listing (listing 1). This listing shows OSG object file
compatible source.
The listing is used to illustrate the methods in which OSG object
files interact with other languages. The compression format used
by OSG is also documented as it is a precursor necessary in
understanding the object file format.
Before examining the actual object file specifics, it will be
beneficial to examine the compression method OSG uses. OSG
compresses screen images by checking the attribute/character for
a screen location. Each location for a screen row (line) is
checked for any contiguous pattern of the same
attribute/character. This allows a line of spaces to be
compressed into three bytes.If the attribute/character differs
from the previous attribute/character, then OSG collects unique
attributes/characters until OSG detects a repeatable pattern.
This process continues until each row (line) selected is checked.
At object file creation time, OSG writes out each line in
compressed form as the 'data' part of the object file. Each group
of repeatable/non-repeatable attributes/characters are called
'character group records'. Each character group record has the
following format:
-------------------------------///---------------
| Record | Screen | Attribute(s)/Character(s) |
| Length | Offset | |
-------------------------------///---------------
Record length is the length of the character group record less
the record length byte itself. The format as is follows:
(c) 1987 Roy Barrow & Douglas H. Steen 18
Object Code SCREEN GENERATOR - OSG
7 6 5 4 3 2 1 0
--------------------------------
| R | 7 bit Length |
--------------------------------
If R = 1 then the character group record is a compressed
repeatable attribute/character and the 7 bit length specifies the
number of instances the attribute/character should be displayed
and only one attribute/character follows the record length byte.
If R = 0 the 7 bit length specifies the number of non-repeatable
attributes/characters following the record length byte and is
followed by the attributes/characters. If R = 0 and the 7 bit
length = 0 then this is the last character group record in the
screen. This value is used to signal the end of the screen.
The screen offset is an offset count into the screen ram (number
of bytes from the beginning of screen ram). This is calculated by
OSG to relieve the assembly language output routine of
recalculating this offset from a row/column address each time the
screen is displayed. The screen offset value starts with 0 being
the first location on the screen.
With an understanding of the compression method used, and a
definition of the character group record, the remainder of this
eratta shall be devoted to the examination of the assembler
source listing (listing 1). The first page is primarily comments
and non-essential statements used for the commenting of the
assembler source. The second page starts with and external
definition (EXTRN) of DISPLAY_SCREEN. DISPLAY_SCREEN is called by
the specific object file to output the character group records to
the screen. DISPLAY_SCREEN is responsible for determining the
type of display and positioning the attribute/characters on the
screen. DISPLAY_SCREEN is defined as far as it is impossible (by
allowing screen object data to be larger than 64K) to have it
defined as a near call.
The next statement (SEGMENT) defines the segment in which our
screen is to reside. To allow then total number of screens to
exceed 64K bytes, each screen is given a unique segment name by
combining the screen name with a '_SEGMENT' suffix. All of the
screen segments are aligned on byte boundaries, are public (can
be called by other modules external to this module) and are of
type class 'code'. This insures the screens reside in a safe area
away from stacks and dynamic data areas.
The ASSUME statement tells the assembler to assume how the
assembler program is going to initialize the various segments.
This is used by the assembler to determine far/near/short
distances for instructions. Both the code segment (CS) and the
data segment (DS) assume we are going to use our screen segment.
The PUBLIC statement specifies the name immediately following as
being a public label. In an OSG object file that name is the name
of the screen.
(c) 1987 Roy Barrow & Douglas H. Steen 19
Object Code SCREEN GENERATOR - OSG
The procedure definition (PROC) just below the public definition
starts the screen area and defines the area as being a far
procedure (this being the only safe assumption).
The CALL statement calls the external DISPLAY_SCREEN routine.
DISPLAY_SCREEN will depend on the character group records to
immediately follow the CALL. After DISPLAY_SCREEN has output all
of the character group records, it returns to the calling
program.
The 'DB' following the call is the start of the character group
records. The record length value (08H) specifies this is a non-
repeatable character group with a length of 8 attribute/character
pairs. The word value following (0080H) specifies an offset into
screen ram by 0080H locations. Note there are 8
attribute/character pairs which matches the length specified
above.
Immediately following the eighth attribute/character pair in the
first character group record is the record length of the next
character group record. Please note that the high order bit of
the length is set specifying this is a repeatable character group
record with a length of 020H. The word value following (0000H) is
the offset into the screen ram at location 0000H.
The attribute/character pair following are to be replicated 020H
times starting at location 0000H in the screen ram.
The byte following the repeatable character group record is the
record length of the next character group record. Please note
then record length is zero which signals DISPLAY_SCREEN that it
has reached the end of the screen image to be output.
The ENDP statement informs the assembler it has reached the end
of the procedure. The ENDS statement informs the assembler it has
reached the end of the defined segment. The ENDS and ENDP
statements are required to terminate SEGMENT and PROC statements
(respectively). Finally the END statement is required to inform
the assembler it has reached the end of the assembly source.
In an actual OSG object file certain labels/values are replaced
with labels/values. The following list may act a guide (please
note that the braces are not included and 'screen.name' is the
name you have given the object file:
SCREENSG_SEGMENT - [screen.name]_SEGMENT
OUTPUTSC - [screen.name]
Example: If a object file name was chosen as MYSCREEN, the
following would be the equivalent :
SCREENSG_SEGMENT - MYSCREEN_SEGMENT
OUTPUTSC - MYSCREEN
(c) 1987 Roy Barrow & Douglas H. Steen 20
Object Code SCREEN GENERATOR - OSG
Listing1 - sample listing
Microsoft (R) Macro Assembler Version 4.00 1/12/87 10:28:16
TEMPSCRN - template for screen display Page 1-1
TITLE TEMPSCRN - template for screen display
PAGE 50,132
;***
; TEMPSCRN
; Purpose:
; To allow a BASIC Compiler program to output the included message
; to the screen. This is a template program to modified later (in
; object form) by a Microsoft Quickbasic program.
;
; CALL OUTPUTSC
;
; Inputs:
; None
; Outputs:
; None
;
; Modifies:
; 08-22-1987 Add variable length screen files
;***
Listing1 - sample listing
Microsoft (R) Macro Assembler Version 4.00 1/12/87 10:28:16
TEMPSCRN - template for screen display Page 1-2
PAGE
EXTRN DISPLAY_SCREEN:FAR
0000 SCREENSG_SEGMENT SEGMENT BYTE PUBLIC 'code'
ASSUME CS:SCREENSG_SEGMENT,DS:SCREENSG_SEGMENT
PUBLIC OUTPUTSC
0000 OUTPUTSC PROC FAR
0000 9A 0000 ---- E CALL DISPLAY_SCREEN ; this will push the stack and offset to
; the stack, telling the program we call
; where to start displaying the data
;
(c) 1987 Roy Barrow & Douglas H. Steen 21
Object Code SCREEN GENERATOR - OSG
0005 08 db 08H ; the number of chars/attribs to transfer
0006 0080 dw 0080H ; offset into the screen to write
0008 54 17 45 07 4D 17 50 db "T",17H,"E",07H,"M",17H,"P",07H
07
0010 54 17 49 07 4D 17 45 db "T",17H,"I",07H,"M",17H,"E",07H
07
;
0018 A0 db 0A0H ; the number of char/attribs to replicate
0019 0000 dw 0000h ; offset to start replication
001B 2B 17 db "+",17H
;
001D 00 db 00 ; the number of char/attribs = 0 to end
;
OUTPUTSC ENDP
001E SCREENSG_SEGMENT ENDS
END
Listing1 - sample listing
Microsoft (R) Macro Assembler Version 4.00 1/12/87 10:28:16
TEMPSCRN - template for screen display Symbols-1
Segments and Groups:
N a m e Size Align Combine Class
SCREENSG_SEGMENT . . . . . . . . 001E BYTE PUBLIC 'CODE'
Symbols:
N a m e Type Value Attr
DISPLAY_SCREEN . . . . . . . . . L FAR 0000 External
OUTPUTSC . . . . . . . . . . . . F PROC 0000 SCREENSG_SEGMENT Global Length = 001E
54 Source Lines
54 Total Lines
25 Symbols
50534 Bytes symbol space free
0 Warning Errors
0 Severe Errors
(c) 1987 Roy Barrow & Douglas H. Steen 22
Object Code SCREEN GENERATOR - OSG
APPENDIX - BOX SELECTION
Throughout OSG, there will be occasion to choose a rectangular
area upon the screen. This could be a small section or the whole
screen.
In selecting an area of the screen, a rectangle will appear which
is locatable. This rectangle should be placed over the area of
the screen that you would like to select. In doing this, the
sides of the box may be moved. There are specific controls in
moving the sized of this box.
A summary of the command keys for positioning and selecting this
box follows.
{HOME}
Expands the selection box so that it fills the whole screen.
{END}
Contracts the box size so that it only covers a small central
area. When first entering the selection, this or {HOME} is
usually one of the first keys pressed in selecting an area.
{PgUp}
Two functions are accomplished. The rectangle will 'grow' in all
directions (up, down, left and right). If a boundary (or border)
is reached, then this function is disabled, but others exist
that allow the box to grow upwards and downwards only, and
another that allow it to grow sideways only.
{PgDn}
This performs the opposite of {PgUp} - the rectangle will
shrink.
{INS}
Increases the width of the selection box on both sides. Again, if
a boundary of the screen is reached, pressing {INS} will have no
effect.
{DEL}
Reduces the width of the selection box, performing the opposite
of {INS}.
{Ctrl-PgUp}
Increases the height and depth of the selection box, limited
again by the boundary.
{Ctrl-PgDn}
Performs the opposite of {Ctrl-PgUp}. A corner of the selection
box is ALWAYS selected. This corner can be discerned by the
Double width Corner character that will appear on one of the
corners.
This selection may be moved by pressing the {TAB} key.
(c) 1987 Roy Barrow & Douglas H. Steen 23
Object Code SCREEN GENERATOR - OSG
The currently selected corner may be expanded or contracted by
using a cursor key.
When {SCROLL LOCK} is depressed, a cursor key will MOVE the box
around the screen instead of allowing it to expand or contract.
Most keyboards have Scroll Lock LED's, but if you are
experiencing problems with box sizing, then try {SCROLL LOCK},
and then try your cursor option again.
APPENDIX - Using OSGBASIC
OSGBASIC is a program that will call up screen images, and allow
you to create input definitions. It is simple to use.
Initially, after having selected a screen to use, you should move
your cursor to a point where you would like an Input Definition.
Press Return, then answer questions about the variable that you
would like input at that point.
Go through this for as many variables as you like (IN SEQUENCE of
how you wish the questions answered), and press ESC when asked
for a varaible name when you are finished.
The Input Libraries are available Only on registration of OSG
Lvele 2 or Level 3.
Hope you enjoy these programs.
Roy Barrow
9-October-1987
(c) 1987 Roy Barrow & Douglas H. Steen 24
Object Code SCREEN GENERATOR - OSG
REGISTRATION INFORMATION
Registering OSG will bring you the source code for all of the
programs mentioned in this documentation - everything you need.
To register, please send a check for one of:
1) $13 - No source, just feel good, get a free update
2) $26 - Manual, free updates for a year
3) $39 - Source code, manual, free updates for a year
4) $49 - ALL of option 4, plus QBTOOLS source code
Our address is:
Inventories Unlimited Inc.
222 Church Street
Philadelphia, PA 19106
(215) 922-2557 (Voice)
(215) 627-3910 (Data)
(c) 1987 Roy Barrow & Douglas H. Steen 25